package com.liufei1988.java8.interview;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ListDemo {
    public static void main(String[] args) {
        List<String> strings=new ArrayList<String>();
        strings.add("qqq");
        strings.add("aaa");
        strings.add("ccc");
        Iterator iterator=strings.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
        System.out.println(strings);
    }
}
